package com.dy.cloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName:
 * @Author: 仄言in
 * @Desctiption: (描述)
 * @Date: 2021/9/24 15:12
 * @Version 1.0 (版本)
 */
@RestController
@RefreshScope           //刷新的注解
public class ConfigController {

    @Value("${config.info}")
    private String configInfo;
    @Value("${server.port}")
    private String serverPort;

    @GetMapping("/configinfo")
    public String getConfigInfo() {
        return configInfo+" "+serverPort;
    }
}
